<template>
	<view class="content" :style="{height:QHeight+ 'px'}">
	    <image src="../../static/闪屏页面.jpg" mode="" :style="{height:QHeight+ 'px'}"></image>
	</view>
</template>

<script>
	import { reactive, toRefs, ref, onMounted } from "vue";
	export default {
		setup() {
			    let Q = reactive({
						QHeight:0,
						time:5
					})
					 onMounted(async()=>{
						 uni.getSystemInfo({
						   success: (res) => {
						     let height = res.windowHeight - uni.upx2px(0)
						     Q.QHeight = height
						   }
						 })
						 let timeS = Q.time;
						 console.log(timeS)
						 QTime(timeS)
					 })
				
					function QTime(timeS) {
      let timeStart = setInterval(function () {
        timeS--;
        if (timeS == 0) {
          clearInterval(timeStart)
          uni.redirectTo({
            url: "./pages/yushe/index"
          })
        }
        console.log(timeS)
      }, 1000, timeS)
    }
		return{
			Q,
			 QTime
		}
					
		}
	}


	
</script>

<style>
	.content {
	  width: 100%;
	  height: 100%;
	}
	.content > image {
	  width: 100%;
	}
</style>
